<template>
  <form-box headText="头信息">
    <el-form-item label="请购单号" label-width="90px">
      <el-input v-model="reqData.head_info.request_no" :disabled="true"></el-input>
    </el-form-item>
    <el-form-item label="经办人" label-width="90px">
      <el-input v-model="reqData.head_info.request_man"></el-input>
    </el-form-item>
    <el-form-item label="请购时间" label-width="90px">
      <el-date-picker
        v-model="reqData.head_info.request_date"
        align="right"
        type="date"
        placeholder="选择日期"
        :picker-options="pickerOptions">
      </el-date-picker>
    </el-form-item>
    <el-form-item label="请购部门" label-width="90px">
      <el-input v-model="reqData.head_info.dep_name"></el-input>
    </el-form-item>
    <el-form-item label="请购原因" label-width="90px">
      <el-input v-model="reqData.head_info.reason"></el-input>
    </el-form-item>

  </form-box>
</template>
<script>
  import formBox from '../../../components/formBox'
  import {
    modifyRequestHead
  } from '@/api/purchase/request'

  export default {
    name:'createReqHead',
    components:{
      formBox
    },
    props:[
      'reqData'
    ],
    data(){
      return {
        pickerOptions: {
          shortcuts: [{
            text: '今天',
            onClick(picker) {
              picker.$emit('pick', new Date());
            }
          }, {
            text: '昨天',
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24);
              picker.$emit('pick', date);
            }
          }, {
            text: '一周前',
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit('pick', date);
            }
          }]
        }
      }
    },
    mounted(){

    },
    methods:{

    }
  }
</script>
<style scoped lang="scss">

</style>
